﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using PhoneStore.Presentation.Util;

namespace PhoneStore.Presentation
{
    /// <summary>
    /// Interaction logic for BillGenerator.xaml
    /// </summary>
    public partial class BillGenerator : Window
    {
        public BillReportWrapperModel source {
            set
            {
                PhoneStore.BillReport b = new BillReport();
                b.SetDataSource(value.list);
                b.SetParameterValue("ActualCost", value.ActualCost);
                b.SetParameterValue("Cost", value.Cost);
                b.SetParameterValue("CusKind", value.CusKind);
                b.SetParameterValue("CusName", value.CusName);
                b.SetParameterValue("Discharge", value.Discharge);
                b.SetParameterValue("Rate", value.Rate);
                MyCrystalReportViewer.ReportSource = b;
            }
        }
        public BillGenerator()
        {
            InitializeComponent();
            
        }        
    }
}
